import { catetypeList } from "@/api/cateType"

const user = {
  state: {
    catetype:{}
  },

  mutations: {
    ListCateType:(state,data)=>{
      state.catetype=data;
    }
  },

  actions: {
    // 无页码约束的所有用户数据
    ListCateType({commit}) {
      return new Promise((resolve, reject) => {
        catetypeList().then(response => {
          // console.log(response);
          commit("ListCateType",response);
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    }

  }
}

export default user;
